#include "_delay.h"
#include "Header_xc8.h"

#define  _XTAL_FREQ	48000000 

void delay_ms(unsigned int interval)
{
    int i;
    for(i=0;i<interval;i+=10)
    {
        __delay_ms(10);
    }
    i=i-10;
    while (i<=interval)
    {
        __delay_ms(1);
        i++;
    }
}
void delay_us(unsigned int interval)
{
    int i;
    interval=interval-16;
    for (i=0;i<interval;i+=10)
    {
        __delay_us(10);
    }
    i-=10;
    while(i<=interval)
    {
        __delay_us(1);
        i++;
    }
}
